package com.ruoyi.discuss.vo;


import java.io.Serializable;


public class TreeDiscussVO extends DiscussVO implements Serializable {


    private String courseName;

    private Integer courseType;

    private Boolean hasChildren;

    private Long parentDiscussId;


    public Integer getCourseType() {
        return courseType;
    }

    public void setCourseType(Integer courseType) {
        this.courseType = courseType;
    }

    public Long getParentDiscussId() {
        return parentDiscussId;
    }

    public void setParentDiscussId(Long parentDiscussId) {
        this.parentDiscussId = parentDiscussId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    @Override
    public void setDiscussCount(Integer discussCount) {
        if (discussCount != null && discussCount.intValue() > 0) {
            this.hasChildren = true;
        }
        super.setDiscussCount(discussCount);
    }




    public Boolean getHasChildren() {
        if (getDiscussCount() != null && getDiscussCount().intValue() > 0) {
            hasChildren = true;
        }
        return hasChildren;
    }


}
